
#import "WorkUrl.h"

@implementation WorkUrl
+ (NSString *)returnURL:(Interface_Type)type{
    NSString *url;
    NSUserDefaults *def = [NSUserDefaults standardUserDefaults];
    NSString *ipDomain = [def objectForKey:@"ipDomain"];
    switch (type) {
        case Interface_For_CART_LIST:{
            url = [NSString stringWithFormat:@"%@/frontend/goods/goods-tree",ipDomain];
        }break;
        case Interface_For_Add_Good:{
            url = [NSString stringWithFormat:@"%@/frontend/cart/add-cart",ipDomain];
        }break;
        case Interface_For_Create_Order:{
            url = [NSString stringWithFormat:@"%@/app/order/create-app-order",ipDomain];
        }break;
        case Interface_For_Board_List:{
            url = [NSString stringWithFormat:@"%@/frontend/board/list",ipDomain];
        }break;
        case Interface_For_Order_List:{
            url = [NSString stringWithFormat:@"%@/app/order/page-order-for-admin",ipDomain];
        }break;
        case Interface_For_Order_Do_Pay:{
            url = [NSString stringWithFormat:@"%@/frontend/coffee-order-pay/do-pay-for-app",ipDomain];
        }break;
        case Interface_For_Order_Out:{
            url = [NSString stringWithFormat:@"%@/app/order-item/dinner-out",ipDomain];
        }break;
        case Interface_For_Order_Close:{
            url = [NSString stringWithFormat:@"%@/app/order/closed",ipDomain];
        }break;
        case Interface_For_Login:{
            url = [NSString stringWithFormat:@"%@/login/login-for-app",ipDomain];
        }break;
        case Interface_For_Update_Order_Remark:{
            url = [NSString stringWithFormat:@"%@/app/order-item/update-remark",ipDomain];
        }break;
        case Interface_For_Get_Free_Board:{
            url = [NSString stringWithFormat:@"%@/app/board/list-free-board",ipDomain];
        }break;
        case Interface_For_Post_Change_Board:{
            url = [NSString stringWithFormat:@"%@/app/order/change-board",ipDomain];
        }break;
        case Interface_For_Post_Refund_Dish:{
            url = [NSString stringWithFormat:@"%@/app/order-item/cancel",ipDomain];
        }break;
        case Interface_For_Get_Beans_Data:{
            url = [NSString stringWithFormat:@"%@/frontend/goods/list-beans",ipDomain];
        }break;
        case Interface_For_Get_Report_List:{
            url = [NSString stringWithFormat:@"%@/report/list-stat-by-bean",ipDomain];
        }break;
        default:
            break;
    }
    return url;
}
@end
